﻿using DomainEventDemo.OrderLogs;
using DomainEventDemo.Orders;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace DomainEventDemo.EntityFrameworkCore
{
    [ConnectionStringName("Default")]
    public class OrderingDomainEventDemoDbContext : AbpDbContext<OrderingDomainEventDemoDbContext>
    {
        public DbSet<Order> Orders { get; set; }
        public DbSet<OrderLog> OrderLogs { get; set; }
        
        public OrderingDomainEventDemoDbContext(DbContextOptions<OrderingDomainEventDemoDbContext> options)
            : base(options)
        {

        }

        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);
            OrderingDomainEventDemoDbContextModelCreatingExtensions.ConfigureDomainEventDemo(builder);
        }
    }
}
